<?php

class City extends CI_Model {
    
    private $table = 'cities'; 
    
    public function getAllRecords() {
        $rows = $this->db->query("SELECT * FROM cities")->result();
        return $rows;
    }
    public function getCityById($id){
        
           
        return  $row = $this->db->select('*')->get_where($this->table, array(
                    'id' => $id
                ))->result(); 
        
    }
}
?>
